package myjava.switcha;

public class Root2 {

   public static void main(String[] args) {

      // char, byte, short, int, or enum sono gli unici tipi permessi per lo switch
      // the only operator available in a switch is ==
      int n = 1;

      switch (n) {
         case 1:
            System.out.println("this is 1");
//         default:
//            System.out.println("DAFAULT");
         case 2:
            System.out.println("this is 2");
         case 3:
            System.out.println("this is 3");
         // the dault condition is always met. It's a sorto of true == true condition
         // also it can be put everywhere in the flow! See above the commented out bit
         default:
            System.out.println("DAFAULT");
      }
   }
}